import request from '@/utils/request'

export const permListAPI = () => request.get('/sys/permission')

export const delPermAPI = (id) => request.delete(`/sys/permission/${id}`)

// 添加权限的接口
export const addPermAPI = (data) => request.post(`/sys/permission`, data)

// 根据id获取详情
export const detailPermAPI = (id) => request.get(`/sys/permission/${id}`)

// 根据id修改权限详情
export const editPermAPI = (data) => request.put(`/sys/permission/${data.id}`, data)
